package com.cn.wanxi.service.impl;

import com.cn.wanxi.dao.ProductDao;
import com.cn.wanxi.dao.impl.ProductDaoImpl;
import com.cn.wanxi.model.ProductModel;
import com.cn.wanxi.model.ResultModel;
import com.cn.wanxi.service.ProductService;

import java.util.List;

public class ProductServiceImpl implements ProductService {
    private ProductDao productDao = new ProductDaoImpl();

    @Override
    public ResultModel add(ProductModel productModel) {
        return null;
    }

    @Override
    public ResultModel update(ProductModel productModel) {
        return null;
    }

    @Override
    public ResultModel delete(ProductModel productModel) {
        return null;
    }

    @Override
    public ResultModel findAll(ProductModel productModel) {
        List<ProductModel> productModelList = productDao.findAll(productModel);
        int count = productDao.getCount(productModel);
        return ResultModel.getResultModel("", 0, count, productModelList);
    }

    @Override
    public ResultModel findById(ProductModel productModel) {
        return null;
    }

    @Override
    public ResultModel getCount(ProductModel productModel) {
        return null;
    }

    @Override
    public ResultModel changeEnable(ProductModel productModel) {
        return null;
    }
}
